import Vue from 'vue'
import App from './App.vue'
// 引入路由
import router from '@/router'

// 引入全局组件
import TypeNav from '@/components/TypeNav'
import Carousel from '@/components/Carousel'
import 'vue-awesome/icons'
import Icon from 'vue-awesome/components/Icon'
// element-ui
import { Button, MessageBox } from 'element-ui';

Vue.component(TypeNav.name, TypeNav)
Vue.component(Carousel.name, Carousel)
Vue.component('icon', Icon)
Vue.component(Button)
Vue.component(MessageBox)
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$msgbox = MessageBox;

// 引入mock数据
import '@/mock/mockServe'

// 引入swiper样式
import 'swiper/css/swiper.min.css'

// 统一引入
import * as API from '@/api'

// 引入仓库
import store from '@/store'

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  beforeCreate(){
    Vue.prototype.$bus = this
    Vue.prototype.$API = API
  },
  router,
  store
}).$mount('#app')
